import request from '@/utils/request'

export function createrole(data) {
  return request({
    url: '​/api​/role​/role',
    method: 'post',
    data
  })
}

export function updaterole(data) {
  return request({
    url: '​/api​/role​/role',
    method: 'put',
    data
  })
}
export function deleterole(data) {
  return request({
    url: '​/api​/role​/role',
    method: 'delete',
    params: data
  })
}

export function getrolebypage(data) {
  return request({
    url: '​/api​/role​/role-by-page',
    method: 'get',
    params: data
  })
}

export function getrolepermissionsids(data) {
  return request({
    url: '​/api​/role​/role-permissions-ids',
    method: 'get',
    params: data
  })
}

export function getallrole() {
  return request({
    url: '​/api​/role​/all-role',
    method: 'get'
  })
}
